Skip to content

add optional marker for early exits in algorithm steps#683

Open
michaelficarra wants to merge 11 commits intomainfrom
mark-early-exits
Open

add optional marker for early exits in algorithm steps#683
michaelficarra wants to merge 11 commits intomainfrom
mark-early-exits

Conversation

@michaelficarra
Copy link
Copy Markdown
Member

@michaelficarra michaelficarra commented Mar 28, 2026

Fixes #673. I went with a global toggle like we use with user code annotations, rather than per-algorithm.

image image image

Disclaimer: I used AI in the process of making this PR.

@michaelficarra michaelficarra requested review from a team and bakkot March 28, 2026 16:37
@nicolo-ribaudo
Copy link
Copy Markdown
Member

This should also mark IfAbruptCloseIterator, IfAbruptCloseAsyncIterator, and IfAbruptRejectPromise.

@michaelficarra
Copy link
Copy Markdown
Member Author

I added support for the 262 macros (though I don't love hard-coding that into ecmarkup) and I updated the styling to match user code annotations:

image

Here's what it looks like with both of them on:

image

Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@michaelficarra michaelficarra force-pushed the mark-early-exits branch 2 times, most recently from b993f73 to 8a0973b Compare March 30, 2026 17:58
Copy link
Copy Markdown
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still mulling over a followup for replacing ownTextContent per #684 (comment) , but this looks coherent in its current form. All suggestions are non-blocking.

gibson042
gibson042 approved these changes Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

highlight all AO exit points when you click return/throw

4 participants